package com.yksj.healthtalk.ui.problemOfWall;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;

import com.yksj.healthtalk.adapter.ProblemDetailAdapter;
import com.yksj.healthtalk.comm.BaseFragmentActivity;
import com.yksj.healthtalk.ui.R;
import com.yksj.healthtalk.ui.views.PullToRefreshListView;

public class CustomerProblemDetailActivity extends BaseFragmentActivity implements OnClickListener{
	
	private Button mTitleBack;
	private Button mTitleRight;
	private PullToRefreshListView mPullToRefreshListView;
	private TextView mTitleName;
	private ListView  mListView;
	private ProblemDetailAdapter mProblemDetailAdapter;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.problem_detail);
		
		initWidget();
		initClickListener();
		initData();
	}

	private void initWidget() {
		// TODO Auto-generated method stub
		mTitleRight	 = (Button)findViewById(R.id.title_right);
		mTitleBack = (Button)findViewById(R.id.title_back);
		mPullToRefreshListView  = (PullToRefreshListView) findViewById(R.id.hall);
		mTitleName = (TextView)findViewById(R.id.title_lable);
		mListView  =  mPullToRefreshListView.getRefreshableView();
	}

	private void initData() {
		// TODO Auto-generated method stub
		mTitleName.setText("问题详情");
		mProblemDetailAdapter = new ProblemDetailAdapter(this);
		mListView.setAdapter(mProblemDetailAdapter);
	}

	private void initClickListener() {
		// TODO Auto-generated method stub
		mTitleBack.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.title_back:
			finish();
			break;

		default:
			break;
		}
	}

}
